%%%-------------------------------------------------------------------
%%% @author Viktor Green <viktor@student.gu.se>
%%% @copyright (C) 2011, Viktor Green
%%% @doc
%%% Tests for the module snoopy_torrent.erl
%%% @end
%%% Created : 12 Dec 2011 by Viktor Green <viktor@student.gu.se>
%%%-------------------------------------------------------------------
-module(snoopy_torrent_tests).

-include_lib("eunit/include/eunit.hrl").

snoopy_torrent_test_() ->
    [
     %fun start/0,
     fun start_stop/0
    ].

%start() ->
%    snoopy_torrent:start(),
%    Sup = whereis(snoopy_torrent_sup),
%    ?assertNot(undefined == Sup),
%    exit(Sup, normal).

start_stop() ->
    %ok = application:start(snoopy_torrent),
    ok = snoopy_torrent:start(),
    ?assertNot(undefined == whereis(snoopy_torrent_sup)),
    ok = application:stop(snoopy_torrent),
    ?assert(undefined == whereis(snoopy_torrent_sup)).

